/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cosc645.ecash;

import java.util.Comparator;

/**
 *
 * @author bob
 */
public class MoneyOrderComparator implements Comparator<MoneyOrder>{

    @Override
    public int compare(MoneyOrder first, MoneyOrder second) {
        
        if(first.getPriority()> second.getPriority())
        {
            return 1;
           
        }
        else
        {
            return -1;
        }
        
    }   
    
}
